﻿namespace Littlefish.Model
{
    /// <summary>
    /// Determines how LINQ Change Tracking is applied
    /// </summary>
    public enum TrackingModes
    {
        /// <summary>
        /// Uses a LINQ connected data context for change management
        /// whenever possible. Save and SubmitChanges operation is used
        /// to persist changes. In general this provides better performance
        /// for change tracking.
        /// </summary>
        Connected,

        /// <summary>
        /// Creates a new DataContext for each operation and performs .Save 
        /// operations by reconnecting to the DataContext.
        /// </summary>
        Disconnected
    }

    /// <summary>
    /// Determines how conflicts on SubmitChanges are handled.
    /// </summary>
    public enum ConflictResolutionModes
    {
        /// <summary>
        /// No Conflict resolution - nothing is done when conflicts
        /// occur. You can check this.Context.ChangeConflicts manually
        /// </summary>
        None,
        /// <summary>
        /// Forces all changes to get written. Last one wins strategy
        /// </summary>
        ForceChanges,
        /// <summary>
        /// Aborts all changes and updates the entities with the values
        /// from the database.
        /// </summary>
        AbortChanges,
        /// <summary>
        /// Writes all changes that are not in conflict. Updates entities
        /// with values from the data.
        /// </summary>
        //WriteNonConflictChanges
    }

    public enum ResultListTypes
    {
        DataReader,
        DataTable,
        DataSet
    }
}